<?php


$redis = new Redis();
if(!$redis->has('str')){
    var_dump($redis->set('str','this is redis_str'));
}else{
    var_dump($redis->get('str'));
}